import { RouteRecordRaw } from 'vue-router'
import type { AppRouteRecordRaw } from '@/router/types';
import { ErrorPage404, ErrorPage403, ErrorPage500, Layout } from '@/router/constant';
import { GoReload } from '@/components/GoReload'


export const LoginRoute: RouteRecordRaw = {
  path: '/login',
  name: 'Login',
  component: () => import('@/views/login/index.vue'),
  meta: {
    title: '登录',
    hidden: true
  },
};

export const HttpErrorPage: RouteRecordRaw[] = [
  {
    path: '/error/404',
    name: 'ErrorPage404',
    component: ErrorPage404,
    meta: {
      title: '404',
      hidden: true
    },
  },
  {
    path: '/error/403',
    name: 'ErrorPage403',
    component: ErrorPage403,
    meta: {
      title: '403',
      hidden: true
    },
  },
  {
    path: '/error/500',
    name: 'ErrorPage500',
    component: ErrorPage500,
    meta: {
      title: '500',
      hidden: true
    },
  },
]

export const ErrorPageRoute: AppRouteRecordRaw = {
  path: '/:path(.*)*',
  name: 'ErrorPage',
  component: ErrorPage404,
  meta: {
    title: 'PageEnum.ERROR_PAGE_NAME_404',
    hideBreadcrumb: true,
    hidden: true
  }
};

// export const ReloadRoute: AppRouteRecordRaw = {
//   path: PageEnum.RELOAD,
//   name: PageEnum.RELOAD_NAME,
//   component: () => import('@/views/project/items/index.vue'),
//   meta: {
//     title: PageEnum.RELOAD_NAME,
//   },
// }

// export const RedirectRoute: AppRouteRecordRaw = {
//   path: PageEnum.REDIRECT,
//   name: PageEnum.REDIRECT_NAME,
//   component: Layout,
//   meta: {
//     title: PageEnum.REDIRECT_NAME,
//   },
//   children: [
//     {
//       path: '/redirect/:path(.*)',
//       name: PageEnum.REDIRECT_NAME,
//       component: () => import('@/views/redirect/index.vue'),
//       meta: {
//         title: PageEnum.REDIRECT_NAME,
//         hideBreadcrumb: true,
//       },
//     },
//   ],
// };
